package com.xja.git.service.impl;

import com.xja.git.entity.Category;
import com.xja.git.mapper.BlogUserMapper;
import com.xja.git.mapper.CategoryMapper;
import com.xja.git.mapper.ConmmentMapper;
import com.xja.git.mapper.EntryMapper;
import com.xja.git.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 作者：罗帅
 * 当前类所在包：com.xja.git.service.impl
 * 创建时间：2022/8/17下午 5:10 星期三
 * 此类简介：
 */
@Service
public class CategoryServiceImpl implements CategoryService {
    @Autowired
    private BlogUserMapper blogUserMapper;
    @Autowired
    private CategoryMapper categoryMapper;
    @Autowired
    private ConmmentMapper conmmentMapper;
    @Autowired
    private EntryMapper entryMapper;

    public BlogUserMapper getBlogUserMapper() {
        return blogUserMapper;
    }

    public void setBlogUserMapper(BlogUserMapper blogUserMapper) {
        this.blogUserMapper = blogUserMapper;
    }

    public CategoryMapper getCategoryMapper() {
        return categoryMapper;
    }

    public void setCategoryMapper(CategoryMapper categoryMapper) {
        this.categoryMapper = categoryMapper;
    }

    public ConmmentMapper getConmmentMapper() {
        return conmmentMapper;
    }

    public void setConmmentMapper(ConmmentMapper conmmentMapper) {
        this.conmmentMapper = conmmentMapper;
    }

    public EntryMapper getEntryMapper() {
        return entryMapper;
    }

    public void setEntryMapper(EntryMapper entryMapper) {
        this.entryMapper = entryMapper;
    }

    //根据id查询name
    @Override
    public List<Category> findAll(){
        return categoryMapper.selectAll();
    }

}
